<!doctype html>
<html>

	<head>
		<meta charset="utf-8">
		<title>邀请好友</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="css/mui.css" rel="stylesheet" />
		<link rel="stylesheet" type="text/css" href="css/common.css"/>
		<link rel="stylesheet" type="text/css" href="css/index.css"/>
	</head>
	<body class="bg_py">
		<header class="mui-bar mui-bar-nav" style="background: transparent;">
		    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
		    <h1 class="mui-title">邀请好友</h1>
		</header>
		<div class="mui-content" style="background: transparent;">
		    <div class="text-center yq_main">
		    	<img class="yq_head" src="images/headimg.png"/>
		    	<p class="bold"><i class="my_name"></i>邀请你一起赏阅图片</p>
		    	<p>邀请码</p>
		    	<span  class="codenum"></span>
		    	<p class="mg_tb20">长按扫码下载APP</p>
		    	<p class="mg_top30">
		    		<img class="code" src="images/code.png"/>
		    	</p>
		    	<p>来自拍拍拍</p>
		    </div>
		</div>
	
		
		
		<script src="js/mui.js"></script>
		<script src="js/jquery-1.7.1.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/index.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			mui.init()
			
			//获取我的信息
			function getUserInfoById(){
				$('.gif').show()
				$.ajax({
					type:"post",
					url:urlcom + "user/getUserInfoById",
					async:true,
					dataType:'json',
					data:{
						userId:localStorage.getItem('userId')
					},
					success:function(res){
						$('.gif').hide()
						if(res.code==0){
							$('.my_name').html(res.data.name)//用户名
							$('.yq_head').attr('src',res.data.headImg)//头像
							$('.codenum').html(res.data.inviteCode)//邀请码
							
							
							//判断是否是vip
							if(res.data.isvip == 1){
								$('.vip_icon').show()
							}else{
								$('.vip_icon').hide()
							}
						}else{
							msg(res.msg)
						}
		 			}
			     })
			}
			getUserInfoById()
		</script>
	</body>

</html>
